<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.wxisme.ssm.po.Album" %>
<%@page import="com.wxisme.ssm.po.Photo" %>
<%@page import="com.wxisme.ssm.po.PhotoJar" %>
<%@page import="java.math.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
	<meta name="author" content="Luka Cvrk - www.solucija.com" />
	<meta name="description" content="Site Description" />
	<meta name="keywords" content="site, keywords" />
	<meta name="robots" content="index, follow" />
	<link rel="stylesheet" type="text/css" media="screen" href="css/style.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="css/side.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="css/button.css" />
	<title>welcome</title>
	
    <%
	String username = (String)session.getAttribute("username");
	if(username == null) {
		response.sendRedirect(basePath + "login.jsp");
	}
	%>
	
	<%
	    String friendname = (String) session.getAttribute("friendname");
		
		String imgPath = (String) request.getAttribute("imgPath");
		int this_num = 0;
		
		if(request.getAttribute("pre")==null) {
			this_num = (Integer) request.getAttribute("next");
		}
		else {
			this_num = (Integer) request.getAttribute("pre");
		}
		
		String description = (String) request.getAttribute("description");
		
		String time = (String) request.getAttribute("time");
		
		if(time == null) {
			time = "图片";
		}
		
		
		int totol = (Integer) request.getAttribute("totol");
		
		session.setAttribute("friend_this_num", this_num);
		
		
	
	 %>


  </head>
  
  <body>
  
	<div class="backwhite">
	<div class="header">
		<div id="search">
			<form action="">
				<fieldset>
					<input type="text" class="field" value="" placeholder="搜索"/>
					<input type="submit" class="buttons" value="" />
				</fieldset>
			</form>
		</div>
		<ul id="menu">
			<li><a href="welcome.jsp">首页</a></li>
			<!-- <li><a href="login.jsp">登录</a></li> -->
			<!-- <li><a href="register.jsp">注册</a></li> -->
			<li><a href="about.jsp">关于</a></li>
			<li><a href="photowall.jsp">照片墙</a></li>
			<li><a class="current" href="#">个人中心</a></li>
			<li>
			<form action="${pageContext.request.contextPath}/logout.action" method="post">
			<div class="logout">
			<input class="inputbutton" type="submit" name="submitlogout" value="退出/切换"/>
		    </div>
			</form>
			
			</li>
		</ul>
	</div>


  		<div class="main">
  		
  		
  		
  			<br />
			<br />
			
			
			<a href="displayFriendAlbums.jsp" class="button button-pill button-primary">返回</a>
			
			<font face="Microsoft YaHei" size="2px" color="#ADADAD">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<%=time %>上传
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<%=description %>
			</font>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<font face="Microsoft YaHei" size="2px" color="green">
				来自<%=friendname %>的共享。
			</font>
			
			<br/><br/>
			
			
			<center>
			<img src="<%=imgPath %>" width="800px" height="auto"/><br/><br/>
			
			
			<div id="scripts">
			<form style="float:left;margin-left:250px;" action="${pageContext.request.contextPath}/preFriendPhoto.action" method="post">
			<input class="button button-rounded button-flat-primary button-large" type="submit" value="上一张"/>
			</form>
			
			
			<font face="Microsoft YaHei" size="2px" color="#ADADAD">
			<%=this_num %>
			/
			<%=totol %>
			
			</font>
			
			<form style="float:right;margin-right:250px;" action="${pageContext.request.contextPath}/nextFriendPhoto.action" method="post">
			<input class="button button-rounded button-flat-primary button-large" type="submit" value="下一张"/>
			</form>
			
			</div>
			
			
			</center>
			
		
  		</div>
		
	</div>
	

	<div id="promo">
		<div class="wrap">
		<!--
			<div class="col">
				<img id="featured" src="images/featured.gif" alt="Featured Image" />
			</div>
	     -->
			
			<div id="footer">
				 <p><a href="#" target="_blank">关于</a>|免责声明：部分素材来自互联网，如有侵权请告知。|欢迎交流：850885154@qq.com</p>
				<p>Copyright &copy; 2015 &minus; 王旭 &minus; Design: &minus; <a href="http://www.cnblogs.com/wxisme/" target="_blank">wxisme</a></p>
			</div>
		</div>
	</div>
	
</body>
</html>
